# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-oslo-serialization
pkgver=5.2.0
_commit=a0ba2d777cc3f96354bf3deab09a5b71a0f37b0a
pkgrel=1
pkgdesc="Oslo Serialization library"
arch=('any')
url="https://docs.openstack.org/developer/oslo.serialization"
license=('Apache')
depends=('python-pbr' 'python-msgpack' 'python-oslo-utils' 'python-pytz')
makedepends=('git' 'python-setuptools')
checkdepends=('python-stestr' 'python-oslotest' 'python-oslo-i18n')
source=("git+https://github.com/openstack/oslo.serialization.git#commit=$_commit")
sha512sums=('SKIP')

prepare() {
  cd oslo.serialization
  # We have system tzdata
  sed -i '/tzdata/d' requirements.txt
}

build() {
  cd oslo.serialization
  python setup.py build
}

check() {
  cd oslo.serialization
  stestr run
}

package() {
  cd oslo.serialization
  python setup.py install --root="$pkgdir/" --optimize=1
}

# vim:set ts=2 sw=2 et:
